// 引用封装好的auth中间件
const authMiddleware = require('../middlewares/auth')
// 引入express模块
const express = require('express')
const { getRoutes } = require('../controllers/routes')

// 创建路由
const router = express.Router()

// API端点，返回用户的路由表
router.get('/user/routes', authMiddleware, getRoutes)

module.exports = router
